package com.trade.module.daq.entity;

import com.trade.module.base.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Class Description: 任务调度实体类
 *
 * @Version v1.0 2017/6/17 12:14
 * @JDK version 1.8.0_51
 * @Author zfb
 */
@Entity
@Table(name = "daq_task")
public class Task extends BaseEntity implements Serializable{
    private static final long serialVersionUID = 6695222961276536444L;
    @Column(
            name = "rule_id",
            length = 64,
            nullable = false
    )
    private String ruleId; //采集规则id

    @Column(
            name = "is_finish",
            length = 5
    )
    private String isFinish; //任务状态是否完成

    @Column(
            name = "started_time",
            length = 20
    )
    private String startedTime; //开始时间

    @Column(
            name = "finished_time",
            length = 20
    )
    private String finishedTime; //结束时间

    @Column(
            name = "estimate_time"
    )
    private Long estimateTime;//预估时间(秒)

    @Column(
            name = "elapsed_time"
    )
    private Long elapsedTime;//占用的时间(秒)

    @Column(
            name = "final_status",
            length = 10
    )
    private String finalStatus; //结果状态

    @Column(
            name = "progress"
    )
    private Double progress;//进度


    @Column(
            name = "app_id",
            length = 120
    )
    private String appid;//hadoop 任务id

    @Column(length = 2)
    private String isHaveProblem;//是否存在问题数据 y/n

    public String getRuleId() {
        return ruleId;
    }

    public void setRuleId(String ruleId) {
        this.ruleId = ruleId;
    }

    public String getIsFinish() {
        return isFinish;
    }

    public void setIsFinish(String isFinish) {
        this.isFinish = isFinish;
    }

    public String getStartedTime() {
        return startedTime;
    }

    public void setStartedTime(String startedTime) {
        this.startedTime = startedTime;
    }

    public String getFinishedTime() {
        return finishedTime;
    }

    public void setFinishedTime(String finishedTime) {
        this.finishedTime = finishedTime;
    }

    public Long getEstimateTime() {
        return estimateTime;
    }

    public void setEstimateTime(Long estimateTime) {
        this.estimateTime = estimateTime;
    }

    public Long getElapsedTime() {
        return elapsedTime;
    }

    public void setElapsedTime(Long elapsedTime) {
        this.elapsedTime = elapsedTime;
    }

    public String getFinalStatus() {
        return finalStatus;
    }

    public void setFinalStatus(String finalStatus) {
        this.finalStatus = finalStatus;
    }

    public Double getProgress() {
        return progress;
    }

    public void setProgress(Double progress) {
        this.progress = progress;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getIsHaveProblem() {
        return isHaveProblem;
    }

    public void setIsHaveProblem(String isHaveProblem) {
        this.isHaveProblem = isHaveProblem;
    }
}
